home *** CD-ROM | disk | FTP | other *** search
/ PC Player 2004 May / pc player 2004-05.iso / Demos / FarCry / Data1.cab / _40F3CF5492B74022A68E8956909B2C7A < prev    next >
Encoding:
Text File  |  2004-01-06  |  5.5 KB  |  141 lines

  1.  
  2. function PipeManager:OnInitCombat()
  3.  
  4.     AI:CreateGoalPipe("send_reinforcements");
  5.     AI:PushGoal("send_reinforcements","signal",0,1,"JoinGroup",SIGNALFILTER_LASTOP);
  6.     AI:PushGoal("send_reinforcements","run",1,1);
  7.     AI:PushGoal("send_reinforcements","bodypos",1,0);
  8.     AI:PushGoal("send_reinforcements","firecmd",1,1);
  9.     AI:PushGoal("send_reinforcements","locate",1,"beacon");
  10.     AI:PushGoal("send_reinforcements","acqtarget",1,"");
  11.     AI:PushGoal("send_reinforcements","approach",1,1);
  12.     AI:PushGoal("send_reinforcements","timeout",1,1);    
  13. --    AI:PushGoal("send_reinforcements","signal",0,1,"SELECT_GROUPADVANCE",SIGNALFILTER_GROUPONLY);
  14.  
  15.     AI:CreateGoalPipe("SwatApproach");
  16.     AI:PushGoal("SwatApproach","bodypos",0,1);
  17.     AI:PushGoal("SwatApproach","run",0,1)
  18.     AI:PushGoal("SwatApproach","hide",0,10,HM_NEAREST_TO_TARGET);
  19.     AI:PushGoal("SwatApproach","signal",0,1,"CHOOSE_ATTACK",0);
  20.     
  21.     AI:CreateGoalPipe("SwatRoll_Left");
  22.     AI:PushGoal("SwatRoll_Left","Trace_Anchor");
  23.     AI:PushGoal("SwatRoll_Left","firecmd",0,0);
  24.     AI:PushGoal("SwatRoll_Left","strafe",0,1);
  25.     AI:PushGoal("SwatRoll_Left","signal",0,1,"SHARED_PLAYLEFTROLL");
  26.     AI:PushGoal("SwatRoll_Left","timeout",1,1);
  27.     AI:PushGoal("SwatRoll_Left","strafe",0,0);
  28.     AI:PushGoal("SwatRoll_Left","firecmd",0,1);
  29.     AI:PushGoal("SwatRoll_Left","timeout",1,60);
  30.  
  31.     AI:CreateGoalPipe("SwatRoll_Right");
  32.     AI:PushGoal("SwatRoll_Right","Trace_Anchor");
  33.     AI:PushGoal("SwatRoll_Right","firecmd",0,0);
  34.     AI:PushGoal("SwatRoll_Right","strafe",0,-1);
  35.     AI:PushGoal("SwatRoll_Right","signal",0,1,"SHARED_PLAYRIGHTROLL");
  36.     AI:PushGoal("SwatRoll_Right","timeout",1,1);
  37.     AI:PushGoal("SwatRoll_Right","strafe",0,0);
  38.     AI:PushGoal("SwatRoll_Right","firecmd",0,1);
  39.     AI:PushGoal("SwatRoll_Right","timeout",1,60);
  40.  
  41. ---------------leans waiting on animation not currently called from combat manager    
  42.     AI:CreateGoalPipe("LeanRight");
  43.     AI:PushGoal("LeanRight","Trace_Anchor");
  44.     AI:PushGoal("LeanRight","firecmd",0,0);
  45.     AI:PushGoal("LeanRight","signal",0,1,"SHARED_LEAN_RIGHT",0);
  46.     AI:PushGoal("LeanRight","firecmd",0,1);
  47.     AI:PushGoal("LeanRight","timeout",1,0.5);
  48.         
  49.     AI:CreateGoalPipe("LeanLeft");
  50.     AI:PushGoal("LeanRight","Trace_Anchor");
  51.     AI:PushGoal("LeanLeft","firecmd",0,0);
  52.     AI:PushGoal("LeanLeft","signal",0,1,"SHARED_LEAN_LEFT",0);
  53.     AI:PushGoal("LeanLeft","firecmd",0,1);
  54.     AI:PushGoal("LeanLeft","timeout",1,0.5);
  55.     
  56.     AI:CreateGoalPipe("ComeOut_Right");
  57.     AI:PushGoal("ComeOut_Right","Trace_Anchor");
  58.     AI:PushGoal("ComeOut_Right","firecmd",0,0);
  59.     AI:PushGoal("ComeOut_Right","strafe",0,1);
  60.     AI:PushGoal("ComeOut_Right","firecmd",0,1);
  61.     AI:PushGoal("ComeOut_Right","timeout",1,0.5);
  62.     AI:PushGoal("ComeOut_Right","strafe",0,0);
  63.             
  64.     AI:CreateGoalPipe("ComeOut_Left");
  65.     AI:PushGoal("ComeOut_Left","Trace_Anchor");
  66.     AI:PushGoal("ComeOut_Left","firecmd",0,0);
  67.     AI:PushGoal("ComeOut_Left","strafe",0,-1);
  68.     AI:PushGoal("ComeOut_Left","firecmd",0,1);
  69.     AI:PushGoal("ComeOut_Left","timeout",1,0.5);
  70.     AI:PushGoal("ComeOut_Left","strafe",0,0);
  71.     
  72.     AI:CreateGoalPipe("Shootspot");
  73.     AI:PushGoal("Shootspot","Trace_Anchor");
  74.     AI:PushGoal("Shootspot","bodypos",0,0);
  75.     AI:PushGoal("Shootspot","firecmd",0,1);
  76.     AI:PushGoal("Shootspot","timeout",1,0.5,1);
  77.     AI:PushGoal("Shootspot","bodypos",0,1);
  78.     AI:PushGoal("Shootspot","firecmd",0,1);
  79.     AI:PushGoal("Shootspot","timeout",1,0.5,3);
  80.         
  81.     AI:CreateGoalPipe("Trace_Anchor");
  82.     AI:PushGoal("Trace_Anchor","pathfind",1,"");
  83.     AI:PushGoal("Trace_Anchor","trace",1,1);
  84.     AI:PushGoal("Trace_Anchor","lookat",0,0,0);
  85.     
  86.     AI:CreateGoalPipe("LookForAlarm");
  87.     AI:PushGoal("LookForAlarm","ignoreall",1,1);
  88.     AI:PushGoal("LookForAlarm","signal",0,1,"FIND_ANCHOR",0);
  89.     
  90.     AI:CreateGoalPipe("NoAlarm");
  91.     AI:PushGoal("NoAlarm","ignoreall",1,0);
  92.     
  93.     AI:CreateGoalPipe("RunToTrigger");
  94.     AI:PushGoal("RunToTrigger","ignoreall",1,1);
  95.     AI:PushGoal("RunToTrigger","bodypos",0,0);
  96.     AI:PushGoal("RunToTrigger","run",0,1);
  97.     AI:PushGoal("RunToTrigger","pathfind",1,"");
  98.     AI:PushGoal("RunToTrigger","trace",1,1);
  99.     AI:PushGoal("RunToTrigger","lookat",0,0,0);
  100.      AI:PushGoal("RunToTrigger","approach",0,.5);    
  101.     AI:PushGoal("RunToTrigger","signal",0,1,"REACHED_TRIGGER",SIGNALFILTER_GROUPONLY);
  102.     AI:PushGoal("RunToTrigger","timeout",1,2);
  103.     AI:PushGoal("RunToTrigger","ignoreall",1,0);
  104.     AI:PushGoal("RunToTrigger","signal",0,1,"PathDone",0);
  105.     
  106.     ------Crouch--------------------------------------
  107.     AI:CreateGoalPipe("Crouch_ComeOut_Left");
  108.     AI:PushGoal("Crouch_ComeOut_Left","bodypos",0,1);
  109.     AI:PushGoal("Crouch_ComeOut_Left","ComeOut_Left");
  110.  
  111.     AI:CreateGoalPipe("Crouch_ComeOut_Right");
  112.     AI:PushGoal("Crouch_ComeOut_Right","bodypos",0,1);
  113.     AI:PushGoal("Crouch_ComeOut_Right","ComeOut_Right");
  114.     
  115.     AI:CreateGoalPipe("Crouch_SwatRoll_Left");
  116.     AI:PushGoal("Crouch_SwatRoll_Left","bodypos",0,1);
  117.     AI:PushGoal("Crouch_SwatRoll_Left","SwatRoll_Left");
  118.     
  119.     AI:CreateGoalPipe("Crouch_SwatRoll_Right");
  120.     AI:PushGoal("Crouch_SwatRoll_Right","bodypos",0,1);
  121.     AI:PushGoal("Crouch_SwatRoll_Right","SwatRoll_Right");
  122.  
  123.     AI:CreateGoalPipe("Crouch_ThrowGrenade");
  124.     AI:PushGoal("Crouch_ThrowGrenade","bodypos",0,1);
  125.     AI:PushGoal("Crouch_ThrowGrenade","Trace_Anchor");
  126.     AI:PushGoal("Crouch_ThrowGrenade","throw_grenade");    
  127.     
  128.             
  129.     AI:PushGoal("Shootspot","Trace_Anchor");
  130.     AI:PushGoal("Shootspot","bodypos",0,0);
  131.     AI:PushGoal("Shootspot","firecmd",0,1);
  132.     AI:PushGoal("Shootspot","timeout",1,0.5,1);
  133.     AI:PushGoal("Shootspot","bodypos",0,1);
  134.     AI:PushGoal("Shootspot","firecmd",0,1);
  135.     AI:PushGoal("Shootspot","timeout",1,0.5,3);
  136.                             
  137.     System:Log("COMBAT PIPES LOADED");
  138. end
  139.  
  140.  
  141.